import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"

import {
  Cart
} from "./module/cartlist";
import {
  User
} from './module/user'

import {
  Address
} from './module/address'
import {
  getters
} from './getter'
import {
  Order
} from './module/order'


Vue.use(Vuex)

export default new Vuex.Store({
  plugins: [
    createPersistedState({
      storage: window.localStorage,
      key: 'store'
    })
  ],
  modules: {
    Cart,
    Order,
    User,
    Address
  },
  getters
})
